package WrittenTest;

import java.util.*;

public class test16 {
    // 拼三角
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        List<List<Integer>> lists = new ArrayList<>();
        int n = in.nextInt();
        for (int i = 0; i < n; i++) {
            List<Integer> list = new ArrayList<>();
            for (int j = 0; j < 6; j++) {
                list.add(in.nextInt());
            }
            lists.add(list);
        }
        for (int i = 0; i < n; i++) {
            List<Integer> list1;
            list1 = lists.get(i);
            // 排序
            list1.sort(new Comparator<Integer>() {
                @Override
                public int compare(Integer o1, Integer o2) {
                    return o1 - o2;
                }
            });
            // 比较
            if (list1.get(0) + list1.get(1) > list1.get(2) &&
                    list1.get(3) + list1.get(4) > list1.get(5) ||
                    list1.get(0) + list1.get(2) > list1.get(3) &&
                    list1.get(1) + list1.get(4) > list1.get(5) ||
                    list1.get(0) + list1.get(3) > list1.get(4) &&
                    list1.get(1) + list1.get(2) > list1.get(5) ||
                    list1.get(0) + list1.get(4) > list1.get(5) &&
                    list1.get(1) + list1.get(2) > list1.get(3)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }
}
